# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2023年03月16日
"""
import openpyxl

myBook=openpyxl.load_workbook('收入表.xlsx')
mySheet=myBook.active
myRows=mySheet['5':'8']
myRowIndex=5
for myRow in myRows:
	myRowSum=sum(myCell.value for myCell in myRow[1:4])
	mySheet.cell(myRowIndex,5).value=myRowSum
	myRowIndex+=1

myBook.save('收入表.xlsx')
